package com.dingding.commonservice.core.company.sql;

/**
 * 
 * @ClassName: CompanySQL 
 * @Description: 租赁公司SQL
 * @author YHQ
 * @date 2016年12月3日 下午2:50:08
 * @since V2.5.7
 * 
 */
public class CompanySQL {

	/**
	 * @author YHQ
	 * @Description: 根据城市Id获取租赁公司
	 */
	public static final String GET_COMPANY_LIST = "SELECT cro.organizationId,o.organizationName FROM dd_city_ref_organization cro INNER JOIN dd_organization o ON cro.organizationId = o.organizationId WHERE cro.cityId = ?";
	
	/**
	 * @author YHQ
	 * @Description: 根据城市Id获取租赁公司
	 */
	public static final String GET_COMPANY_BY_ID = "SELECT o.organizationId,o.organizationName FROM dd_organization o WHERE o.organizationId = ?";
	
	/**
	 * @author hufan
	 * @Description: 根据城市Id获取租赁公司详情
	 */
	public static final String GET_ORGANIZATION_DETAILS_BY_ID = "SELECT `organizationId`,`parentId`,`parentIds`,`cityName`,`cityId`,`organizationName`,`organizationAddr`,`businessLicence`,`contacts`,`contactsNumber`,`contactsEmail`,`licenseStartDate`,`licenseEndDate`,`organizationType`,`organizationStatus`,`remarks`,`createTime`,`createUserId`,`updateTime`,`updateUserId`,`delFlag` FROM `dd_organization` WHERE `delFlag` = 0 AND `organizationId` = ?";
	
}
